#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "dwgobject.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
enum DrawType
{
    DNone,
    DLine,
    DCircle,
    DRectangle,
    Dpoint
};
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    DrawType curDrawType=DNone;
    QVector<DwgObject *> mObjVec ;
    QPainter *m_painter = nullptr;

private slots:

    void pointTB_clicked();
    void lineTB_clicked();
    void cirAct1_triggered();
    void RectangleTB_clicked();

    void on_actionExit_triggered();

    void on_actionNew_triggered();

    void on_actionOpen_triggered();

    void on_actionSave_triggered();

    void on_actionSaveAs_triggered();

private:
    Ui::MainWindow *ui;
protected:
    void paintEvent(QPaintEvent *event);
    virtual void mousePressEvent(QMouseEvent *event);
};
#endif // MAINWINDOW_H
